import request from '@/utils/request'

// 查询字典数据列表
export function listData(query) {
  return request({
    url: '/system/dict/data_list',
    method: 'get',
    params: query
  })
}


// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
  return request({
    url: '/system/dict/getDicts?type=' + dictType,
    method: 'get'
  })
}

// 新增字典数据
export function saveData(data) {
  return request({
    url: '/system/dict/saveData',
    method: 'post',
    data: data
  })
}


// 删除字典数据
export function delData(data) {
  return request({
    url: '/system/dict/delData',
    method: 'post',
    data: data
  })
}